const Base = require('./base/base');

const
	dict = "0123456789";

/**
 * @extends base
 */
module.exports = class extends Base {
	encodeAction(param){
		return parma.text.split('').map(c=>{
			let i=dict.indexOf(c);
			if (i==-1) return c;
			else
				return (i<dict.length/2)?dict[i+dict.length/2]:dict[i-dict.length/2]
		}).join('');
	}
	decodeAction(param){
		return this.encodeAction(param.text);
	}
}
